﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace Alfa.Common.ValidationRules {
	public class NotEmptyValidationRule : ValidationRuleBase {
		public NotEmptyValidationRule( ) { }

		public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo) {
			if (value is string)
				if ((string)value == "")
					return this.ParseError(false, Messages.IsRequired);

			return this.ParseError(true, null);
		}
	}
}
